package cn.terminus.client.customer.contractrentclause.service;

import cn.terminus.client.customer.contractrentclause.param.*;
import cn.terminus.client.customer.contractrentclause.result.ContractRentClauseResult;
import cn.terminus.result.common.context.TerminusCallContext;
import cn.terminus.result.common.exception.ServiceException;
import cn.terminus.result.common.page.TerminusPageAble;
import cn.terminus.result.common.page.TerminusPageInfo;
import cn.terminus.result.common.result.TerminusResult;

import java.util.List;

/**
 * 合同租金条款(ContractRentClause)表服务接口
 *
 * @author makejava
 * @since 2021-07-21 11:01:11
 */
public interface ContractRentClauseService {

    /**
     * 新增
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<String> add(ContractRentClauseNewParam param, TerminusCallContext context) throws ServiceException;

    /**
     * 更新
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<Boolean> update(ContractRentClauseEditParam param, TerminusCallContext context) throws ServiceException;


    /**
     * gets
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<List<ContractRentClauseResult>> gets(ContractRentClauseGetsParam param, TerminusCallContext context) throws ServiceException;

    /**
     * 删除
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<Boolean> delete(ContractRentClauseDeleteParam param, TerminusCallContext context) throws ServiceException;

    /**
     * 查询
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<List<ContractRentClauseResult>> query(ContractRentClauseQueryParam param, TerminusCallContext context) throws ServiceException;

    /**
     * 分页查询
     *
     * @param param
     * @param page
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<TerminusPageAble<ContractRentClauseResult>> page(ContractRentClauseQueryParam param, TerminusPageInfo page, TerminusCallContext context) throws ServiceException;

    /**
     * 根据合同ID删除条款信息
     *
     * @param id
     */
    TerminusResult<Boolean> deleteWithContractId(Long id) throws ServiceException;
}
